package com.saer.server.hibernate.model;

// Generated 02/10/2012 01:48:05 by Hibernate Tools 3.4.0.CR1

import java.math.BigDecimal;
import java.sql.Blob;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * Visita generated by hbm2java
 */
@Entity
@Table(name = "visita", catalog = "saer", uniqueConstraints = @UniqueConstraint(columnNames = {
		"paciente_id", "enfermero_id", "fecha" }))
public class Visita implements java.io.Serializable {

	private static final long serialVersionUID = 2908826496415195197L;
	private int id;
	private Paciente paciente;
	private Enfermero enfermero;
	private Date fecha;
	private BigDecimal temperatura;
	private Integer presion_distolica;
	private Integer presion_sistolica;
	private Integer frespiratoria;
	private Integer pulsaciones;
	private Integer glucosaSangre;
	private Integer oxigenoSangre;
	private String sintomas;
	private Cap cap;
	private Integer estado;
	private Blob  ecg;

	public Visita() {
	}

	public Visita(int id, Paciente paciente, Enfermero enfermero, Date fecha) {
		this.id = id;
		this.paciente = paciente;
		this.enfermero = enfermero;
		this.fecha = fecha;
	}

	public Visita(int id, Paciente paciente, Enfermero enfermero, Date fecha,
			BigDecimal temperatura, Integer presion_sistolica,
			Integer presion_distolica, Integer frespiratoria,
			Integer pulsaciones, Integer glucosaSangre, Integer oxigenoSangre,
			String sintomas, Cap cap, Integer estado, Blob ecg) {
		this.id = id;
		this.cap = cap;
		this.paciente = paciente;
		this.enfermero = enfermero;
		this.fecha = fecha;
		this.temperatura = temperatura;
		this.presion_sistolica = presion_sistolica;
		this.presion_distolica = presion_distolica;
		this.frespiratoria = frespiratoria;
		this.pulsaciones = pulsaciones;
		this.glucosaSangre = glucosaSangre;
		this.oxigenoSangre = oxigenoSangre;
		this.sintomas = sintomas;
		this.estado = estado;
		this.ecg = ecg;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "paciente_id", nullable = false)
	public Paciente getPaciente() {
		return this.paciente;
	}

	public void setPaciente(Paciente paciente) {
		this.paciente = paciente;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "cap_id", nullable = false)
	public Cap getCap() {
		return this.cap;
	}

	public void setCap(Cap cap) {
		this.cap = cap;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "enfermero_id", nullable = false)
	public Enfermero getEnfermero() {
		return this.enfermero;
	}

	public void setEnfermero(Enfermero enfermero) {
		this.enfermero = enfermero;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "fecha", nullable = false, length = 19)
	public Date getFecha() {
		return this.fecha;
	}

	public void setFecha(Date fecha) {
		this.fecha = fecha;
	}

	@Column(name = "temperatura", precision = 3, scale = 1)
	public BigDecimal getTemperatura() {
		return this.temperatura;
	}

	public void setTemperatura(BigDecimal temperatura) {
		this.temperatura = temperatura;
	}

	@Column(name = "presion_distolica")
	public Integer getPresion_Distolica() {
		return this.presion_distolica;
	}

	public void setPresion_Distolica(Integer presion_distolica) {
		this.presion_distolica = presion_distolica;
	}

	@Column(name = "presion_sistolica")
	public Integer getPresion_Sistolica() {
		return this.presion_sistolica;
	}

	public void setPresion_Sistolica(Integer presion_sistolica) {
		this.presion_sistolica = presion_sistolica;
	}

	@Column(name = "frespiratoria")
	public Integer getFrespiratoria() {
		return this.frespiratoria;
	}

	public void setFrespiratoria(Integer frespiratoria) {
		this.frespiratoria = frespiratoria;
	}

	@Column(name = "pulsaciones")
	public Integer getPulsaciones() {
		return this.pulsaciones;
	}

	public void setPulsaciones(Integer pulsaciones) {
		this.pulsaciones = pulsaciones;
	}

	@Column(name = "glucosa_sangre")
	public Integer getGlucosaSangre() {
		return this.glucosaSangre;
	}

	public void setGlucosaSangre(Integer glucosaSangre) {
		this.glucosaSangre = glucosaSangre;
	}

	@Column(name = "oxigeno_sangre")
	public Integer getOxigenoSangre() {
		return this.oxigenoSangre;
	}

	public void setOxigenoSangre(Integer oxigenoSangre) {
		this.oxigenoSangre = oxigenoSangre;
	}

	@Column(name = "sintomas", length = 500)
	public String getSintomas() {
		return this.sintomas;
	}

	public void setSintomas(String sintomas) {
		this.sintomas = sintomas;
	}

	@Column(name = "estado")
	public Integer getEstado() {
		return this.estado;
	}

	public void setEstado(Integer estado) {
		this.estado = estado;
	}
	@Column(name = "ecg")
	public Blob getEcg() {
		return this.ecg;
	}

	public void setEcg(Blob ecg) {
		this.ecg = ecg;
	}
	

	
}
